package com.bysj.lms.controller;

import com.bysj.lms.common.ResultModel;
import com.bysj.lms.pojo.entity.Course;
import com.bysj.lms.pojo.vo.CourseVo;
import com.bysj.lms.service.ICourseRangeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "排课管理")
@RestController
@RequestMapping("/course-range")
public class CourseRangeController {

    @Autowired
    ICourseRangeService courseRangeService;

    @ApiOperation("根据期望选择空白时间")
    @GetMapping("/getBlackTime")
    public ResultModel getBlackTime(Integer classId,String tname,String term,Integer startWeek,Integer endWeek,Integer week){
        System.out.println(tname);
        List<CourseVo> blackWeek = courseRangeService.getBlackWeek(classId, tname, term, startWeek, endWeek, week);
        return ResultModel.success("查询成功",blackWeek);
    }
}
